package com.guli.auth.feign;

import com.guli.common.to.MemberTo;
import com.guli.auth.vo.UserVo;
import com.guli.common.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/*
 * @Author 罗
 * @date 2020/10/18 - 6:55 下午
 */
@FeignClient(name="member-service")
public interface MemberServiceFeignClient {

    @PostMapping("/member/member/save")
    @ApiOperation("插入Member")
    public R addUser(@RequestBody Map<String,String> member);

    @PostMapping("/member/member/login")
    @ApiOperation("用户登陆")
    public R login(@RequestBody UserVo memberEntity);

    @PostMapping("/member/member/loginFromWeiBoUid")
    @ApiOperation("通过微博的UID进行登陆，如果数据库中没有该用户，那么将该用户添加到数据库")
    public R loginFromWeiBoUid(@RequestBody MemberTo memberTo);

}
